package com.escool.model;

// Generated Dec 12, 2012 8:20:30 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbInscripcion generated by hbm2java
 */
@Entity
@Table(name = "tb_inscripcion")
public class TbInscripcion implements java.io.Serializable {

	private Integer idInscripcion;
	private TbSeccion tbSeccion;
	private TbSedeHasSeccion tbSedeHasSeccion;
	private TbPerfilPago tbPerfilPago;
	private TbMatricula tbMatricula;
	private TbExpediente tbExpediente;
	private String fechaInscripcion;
	private Set<TbPago> tbPagos = new HashSet<TbPago>(0);

	public TbInscripcion() {
	}

	public TbInscripcion(TbSeccion tbSeccion,
			TbSedeHasSeccion tbSedeHasSeccion, TbPerfilPago tbPerfilPago,
			TbMatricula tbMatricula, TbExpediente tbExpediente,
			String fechaInscripcion) {
		this.tbSeccion = tbSeccion;
		this.tbSedeHasSeccion = tbSedeHasSeccion;
		this.tbPerfilPago = tbPerfilPago;
		this.tbMatricula = tbMatricula;
		this.tbExpediente = tbExpediente;
		this.fechaInscripcion = fechaInscripcion;
	}

	public TbInscripcion(TbSeccion tbSeccion,
			TbSedeHasSeccion tbSedeHasSeccion, TbPerfilPago tbPerfilPago,
			TbMatricula tbMatricula, TbExpediente tbExpediente,
			String fechaInscripcion, Set<TbPago> tbPagos) {
		this.tbSeccion = tbSeccion;
		this.tbSedeHasSeccion = tbSedeHasSeccion;
		this.tbPerfilPago = tbPerfilPago;
		this.tbMatricula = tbMatricula;
		this.tbExpediente = tbExpediente;
		this.fechaInscripcion = fechaInscripcion;
		this.tbPagos = tbPagos;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_inscripcion", unique = true, nullable = false)
	public Integer getIdInscripcion() {
		return this.idInscripcion;
	}

	public void setIdInscripcion(Integer idInscripcion) {
		this.idInscripcion = idInscripcion;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tb_seccion_id_seccion", nullable = false)
	public TbSeccion getTbSeccion() {
		return this.tbSeccion;
	}

	public void setTbSeccion(TbSeccion tbSeccion) {
		this.tbSeccion = tbSeccion;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tb_sede_has_seccion_id_sede_has_seccion", nullable = false)
	public TbSedeHasSeccion getTbSedeHasSeccion() {
		return this.tbSedeHasSeccion;
	}

	public void setTbSedeHasSeccion(TbSedeHasSeccion tbSedeHasSeccion) {
		this.tbSedeHasSeccion = tbSedeHasSeccion;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tb_perfil_pago_id_perfil_pago", nullable = false)
	public TbPerfilPago getTbPerfilPago() {
		return this.tbPerfilPago;
	}

	public void setTbPerfilPago(TbPerfilPago tbPerfilPago) {
		this.tbPerfilPago = tbPerfilPago;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tb_matricula_id_matricula", nullable = false)
	public TbMatricula getTbMatricula() {
		return this.tbMatricula;
	}

	public void setTbMatricula(TbMatricula tbMatricula) {
		this.tbMatricula = tbMatricula;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tb_expediente_id_expediente", nullable = false)
	public TbExpediente getTbExpediente() {
		return this.tbExpediente;
	}

	public void setTbExpediente(TbExpediente tbExpediente) {
		this.tbExpediente = tbExpediente;
	}

	@Column(name = "fecha_inscripcion", nullable = false, length = 45)
	public String getFechaInscripcion() {
		return this.fechaInscripcion;
	}

	public void setFechaInscripcion(String fechaInscripcion) {
		this.fechaInscripcion = fechaInscripcion;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tbInscripcion")
	public Set<TbPago> getTbPagos() {
		return this.tbPagos;
	}

	public void setTbPagos(Set<TbPago> tbPagos) {
		this.tbPagos = tbPagos;
	}

}
